import request from '@/utils/request'

/**
 * 动态查询教师分页
 * @param current 当前页
 * @param limit 当前页显示条数
 * @param queryInfo 查询条件
 * @returns {AxiosPromise}
 */
export const reqTeacherList = (current,limit,queryInfo) => request({url:`/teacher/page/${current}/${limit}`,method:"post",data:queryInfo})

/**
 * 根据id查询教师
 * @param id
 * @returns {AxiosPromise}
 */
export const reqGetTeacherById = (id) => request({url:`/teacher/getTeacher/${id}`,method: 'get'})

/**
 * 根据id逻辑删除教师
 * @param id
 * @returns {AxiosPromise}
 */
export const reqRomoveTeacherById = (id) => request({url:`/teacher/${id}`,method: 'delete'})

/**
 * 修改教师资料
 * @param teacher
 * @returns {AxiosPromise}
 */
export const reqEditTeacher = (teacher) => request({url:`/teacher/editTeacher`,method: 'post', data: teacher})
/**
 * 添加教师
 * @param teacher
 * @returns {AxiosPromise}
 */
export const reqSaveTeacher = (teacher) => request({url:`/teacher/saveTeacher`,method: 'post' ,data: teacher})
/**
 * 批量删除教师
 * @param ids
 * @returns {AxiosPromise}
 */
export const reqRemoveTeachers = (ids) => request({url:`/teacher/removeTeachers`,method: 'post' ,data: ids})
